package com.ruoyi.file.service.impl;

import cn.hutool.core.util.IdUtil;
import com.ruoyi.file.domain.ModelTaskLayers;
import com.ruoyi.file.mapper.ModelTaskLayersMapper;
import com.ruoyi.file.service.IModelTaskLayersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ModelTaskLayersServiceImpl implements IModelTaskLayersService {

    @Autowired
    private ModelTaskLayersMapper modelTaskLayerMapper;
    @Override
    public ModelTaskLayers selectModelTaskLayerById(Long id) {
        return modelTaskLayerMapper.selectModelTaskLayerById(id);
    }

    @Override
    public List<ModelTaskLayers> selectModelTaskLayerList(ModelTaskLayers modelTaskLayer) {
        return modelTaskLayerMapper.selectModelTaskLayerList(modelTaskLayer);
    }

    @Override
    public int insertModelTaskLayer(ModelTaskLayers modelTaskLayer) {
        modelTaskLayer.setId(IdUtil.getSnowflakeNextId());
        return modelTaskLayerMapper.insertModelTaskLayer(modelTaskLayer);
    }

    @Override
    public int updateModelTaskLayer(ModelTaskLayers modelTaskLayer) {
        return modelTaskLayerMapper.updateModelTaskLayer(modelTaskLayer);
    }

    @Override
    public int deleteModelTaskLayerByIds(Long id) {
        return modelTaskLayerMapper.deleteModelTaskLayerByIds(id);
    }

    @Override
    public int deleteModelTaskByIds(Long[] ids) {
        return modelTaskLayerMapper.deleteModelTaskByIds(ids);
    }
}
